package cn.chinamobile.entities;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommonResult<T> {
    /*
    * code:200, 服务器成功返回请求的数据
    * code:500, 服务端出错了
    * code:400, 前端发出的请求错误
    * */
    private Integer code;
    private String message;
    private T data;
    public CommonResult(Integer code, String message) {
        this(code, message, null);
    }
}
